package cn.lg.soar.system.auth.service;

import cn.lg.soar.database.base.service.IBaseService;
import cn.lg.soar.system.auth.entity.Permit;

import java.util.Collection;
import java.util.List;

/**
 * @author luguoxiang
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
public interface IPermitService extends IBaseService<Permit> {

    List<Permit> listByCodes(Collection<String> codes);

    /**
     * 获取角色权限
     * @param roleId
     * @return
     */
    List<String> codesByRoleId(Long roleId);

    /**
     * 清空缓存
     */
    void clearCache();

    /**
     * 扫描生成权限
     */
    void scanServletPathGenPermit();

    Permit getByCode(String code);

}
